package com.jing.myblogsm.service;

import com.jing.myblogsm.dao.ArticleMapper;
import com.jing.myblogsm.dao.UserMapper;
import com.jing.myblogsm.model.Userinfo;
import com.jing.myblogsm.model.vo.UserinfoVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class UserService {

    @Resource
    private UserMapper userMapper;

    public int reg(Userinfo userinfo) {
        return userMapper.reg(userinfo);
    }

    public Userinfo getUserByName(String username) {
        return userMapper.getUserByName(username);
    }

    public UserinfoVo getUserById(int uid) {
        return userMapper.getUserById(uid);
    }


}
